package com.it.iostream.Utils;

import com.it.iostream.Dao.ResPonseResult;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
/*
* */

public class ResPonseResultUtils {

    public static ResPonseResult ResResult(int ReturnCode, String Message,HashMap data) throws ParseException {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss") ;
        Date createtime = simpleDateFormat.parse(simpleDateFormat.format(new Date()));
        ResPonseResult resPonseResult = new ResPonseResult();
        resPonseResult.setReturnCode(ReturnCode);
        resPonseResult.setMessage(Message);
        resPonseResult.setData(data);
        resPonseResult.setTimeNow(createtime);
        return  resPonseResult;
    }
}
